{extend name="base" /}
{block name="title"}后台管理-网络报修管理{/block}
{block name="main"}
<div class="widget-body">
    模糊字批量恢复：<input type="text" name="key">
    <a href="{:url('comments/index')}">显示正常评论</a>
    <table id="users" class="table table-striped table-bordered dataTable">
        <thead>
            <tr>
                <th>评论者</th>
                <th>商品</th>
                <th>评论内容</th>
                <th></th>
            </tr>
        </thead>
        <tbody>
            {volist name="comments" id="vo"}
            <tr title="{$vo.cContent}">
                <td>{$vo.name}</td>
                <td gid="{$vo.gId}">{$vo.gTitle}</td>
                <td>
                    <div class="line-limit-length">{$vo.cContent}</div>
                </td>
                <td>
                    <div class="btn-group">
                        <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#">
                            操作
                            <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu pull-right">
                            <li>
                                <a href="{:url('del',['cid'=>$vo.cId])}">
                                    <i class="icon-trash"></i> 删除
                                </a>
                            </li>
                        </ul>
                    </div>
                </td>
            </tr>
            {/volist}
        </tbody>
    </table>
</div>

<script src="__STATIC__/assets/js/jquery.min.js"></script>
<script>
    $("input[name='key']").on("change",function(){
        console.log($(this).val());
        $.ajax({
            type: 'post',
            url: "{:url('Comments/recoverlot')}",
            data: {
                "key":$(this).val()
            },
            success: function (data) {
                console.log(data);
                location.href = "";
            },
            error: function (error) {

            }
        })
    })
</script>
{/block}
